#pragma once
#include<iostream>
#include<cstring>
#include<ctime>

#define INFO 1  //正常
#define WARNING 2  //警告，不算出错，也不影响程序
#define ERROR 3    //出错，但程序可以继续运行
#define FATAL 4    //致命错误，程序终止

#define LOG(level, message) Log(#level, message, __FILE__, __LINE__)

void Log(std::string level, std::string message, std::string file_name, int line)
{
    std::cout<<"["<<level<<"]"<<"["<<time(nullptr)<<"]"<<"["<<message<<"]"<<"["<<file_name<<"]"<<"["<<line<<"]"<<std::endl;
}